package com.niiwoo.civet.trade.service.local.kaola;

import com.niiwoo.civet.trade.enums.kaola.KaoLaLiCaiReceiveEnum;
import com.niiwoo.tripod.base.helper.ApplicationContextHelper;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;

/**
 * Created by daizhiyue on 2017/12/25.
 */
@Service
public class KaoLaLiCaiReceiveServiceFactoryImpl implements KaoLaLiCaiReceiveServiceFactory {

    @Override
    public KaoLaLiCaiReceiveService getServiceByEnum(KaoLaLiCaiReceiveEnum kaoLaLiCaiReceiveEnum) {
        ApplicationContext applicationContext = ApplicationContextHelper.getApplicationContext();
        return applicationContext.getBean(kaoLaLiCaiReceiveEnum.getServiceBeanName(), KaoLaLiCaiReceiveService.class);

    }
}
